package com.hnnu.shoppingtoghter.demo.mapper;

import com.hnnu.shoppingtoghter.demo.entity.Project;
import org.apache.ibatis.annotations.Mapper;

import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * @Description:
 * @Author: liu_cheng_xi
 * @CreateTime： 2022/7/1 8:59
 */
@Mapper
public interface ProjectMapper {
    /**
     * @Description: 通过数据库来查询商品信息
     * @Author: liu_cheng_xi
     * @CreateTime: 2022/7/4 11:18
     * @param: project
     * @return: java.util.List<com.hnnu.shoppingtoghter.demo.entity.Project>
     **/

    List<Project> selectListByProject(Project project);

    /**
     * @Description: 将商品对象插入到表里
     * @Author: liu_cheng_xi
     * @CreateTime: 2022/7/4 11:19
     * @param: null
     * @return: null
     **/
    int insertProject(Project project);

    /**
     * @Description: 根据商品ID 获取数据库的商品全部信息 进行更新
     * @Author: liu_cheng_xi
     * @CreateTime: 2022/7/5 11:20
     * @param: null
     * @return: null
     **/
    Project selectProjectById(Integer commodityId);

    /**
     * @Description: 修改商品信息
     * @Author: liu_cheng_xi
     * @CreateTime: 2022/7/5 21:39
     * @param: null
     * @return: null
     **/
    int Update(Project project);

    /**
     * @Description: 删除商品
     * @Author: liu_cheng_xi
     * @CreateTime: 2022/7/6 15:30
     * @param: commodityId
     * @return: int
     **/

    int DeleteProject(Integer commodityId);

    /**
     * @Description: TODO
     * @Author: liu_cheng_xi
     * @CreateTime: 2022/7/6 23:12
     * @param: commodityUser
     * @return: com.hnnu.shoppingtoghter.demo.entity.Project
     **/


    List<Project> selectProjectByUser(Project project);
}
